import request from '@/utils/request'

// 查询满减满送活动列表
export function listGiveaway(query) {
  return request({
    url: '/fullminusgiveaway/giveaway/list',
    method: 'get',
    params: query
  })
}
// 查询商品列表
export function goodsList() {
  return request({
    url: '/fullminusgiveaway/giveaway/goodsList',
    method: 'get',
  })
}

// 查询满减满送活动详细
export function getGiveaway(id) {
  return request({
    url: '/fullminusgiveaway/giveaway/' + id,
    method: 'get'
  })
}

// 新增满减满送活动
export function addGiveaway(data) {
  return request({
    url: '/fullminusgiveaway/giveaway',
    method: 'post',
    data: data
  })
}

// 修改满减满送活动
export function updateGiveaway(data) {
  return request({
    url: '/fullminusgiveaway/giveaway',
    method: 'put',
    data: data
  })
}

// 删除满减满送活动
export function delGiveaway(id) {
  return request({
    url: '/fullminusgiveaway/giveaway/' + id,
    method: 'delete'
  })
}
